package com.esl.model.admin;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name = "T_Info")
@Cache(usage=CacheConcurrencyStrategy.READ_ONLY)
public class Info implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id; // ID 号
	private String title;// 标题
	private String content;// 内容
	private String author;// 作者
	private String kind;// 信息类别
	private String temp; // 备注
	private Date date = new Date(); // 发布时间

	public Info() {
		super();
	}

	public Info(String title, String content, String author, String kind) {
		super();
		this.title = title;
		this.content = content;
		this.author = author;
		this.kind = kind;
	}

	/*---------------------------------------------*/
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "i_id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "i_title")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "i_content")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "i_author")
	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	@Column(name = "i_kind")
	public String getKind() {
		return kind;
	}

	public void setKind(String kind) {
		this.kind = kind;
	}

	@Column(name = "i_temp")
	public String getTemp() {
		return temp;
	}

	public void setTemp(String temp) {
		this.temp = temp;
	}

	@Column(name = "i_date")
	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

}
